
import flask,json

from demo003.mysqlUtil import MysqlUtil
from demo003.studentBean import StudentBean

api = flask.Flask(__name__)
@api.route('/index',methods=['get'])
def index():

    ren = {
        'msg': '成功访问首页',
        'msg_code': 200
    }

    return json.dumps(ren, ensure_ascii=False)

if __name__ == '__main__':
    api.run(port=8888, debug=True, host='127.0.0.1')  # 启动服务
    # debug=True,改了代码后，不用重启，它会自动重启
    # 'host='127.0.0.1'别IP访问地址